gtk: honor entry->has_frame again draw the frame conditionally
authorMichael Natterer <mitch@gimp.org>
Thu, 18 Nov 2010 00:04:11 +0000 (01:04 +0100)
committerMichael Natterer <mitch@gimp.org>
Thu, 18 Nov 2010 00:06:57 +0000 (01:06 +0100)
when GtkEntry had visible windows, it was never noticed that we always
draw the frame, because the text_area window would cover it if
draw_frame was FALSE.

gtk/gtkentry.c

index d177ba2e8ade736a6e5fd5a3439b8a77abad84e5..29281f0348dc489dfe88bcfb5a3eb85046809da1 100644 (file)
@@ -3370,10 +3370,10 @@ gtk_entry_draw_frame (GtkWidget      *widget,
                       widget, "entry_bg",
                       x, y, width, height);
 
-  gtk_paint_shadow (style, cr,
-                    state, priv->shadow_type,
-                    widget, "entry", x, y, width, height);
-
+  if (GTK_ENTRY (widget)->has_frame)
+    gtk_paint_shadow (style, cr,
+                      state, priv->shadow_type,
+                      widget, "entry", x, y, width, height);
 
   gtk_entry_draw_progress (widget, cr);